import _ from 'lodash'

export const responseSuccess = data => {
  return {
    code: 200,
    msg: '操作成功',
    data
  }
}

export const responseFaild = (data, errCode) => {
  return _.assignIn(
    {
      code: errCode || 400,
      msg: '操作失败'
    },
    data
  )
}
